package cn.itcast.java.stream;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * Author itcast
 * Date 2021/10/12 21:21
 * Desc TODO
 */
public class FileOutputStreamDemo {
    public static void main(String[] args) throws IOException {
        /**
         * FileOutputStream(name,Boolean)
         * FileOutputStream(File,Boolean)
         */
        FileOutputStream fos = new FileOutputStream("data/output/abc.txt");
//        byte[] arr = {'a','b','c'};
        /*byte[] arr = new byte[1024];
        for (int i = 0; i < 1 * 1024 * 1024; i++) {
            fos.write(arr);
        }*/
        String file="hello world";
        fos.write(file.getBytes());

    }
}
